import { transformDSL } from "./DSLMigrations";
import { LATEST_PAGE_VERSION, RenderModes } from "constants/WidgetConstants";
import type { ContainerWidgetProps } from "widgets/ContainerWidget/widget";
import type { WidgetProps } from "widgets/BaseWidget";
import { OverflowTypes } from "widgets/TextWidget/constants";
import { migrateRadioGroupAlignmentProperty } from "./migrations/RadioGroupWidget";
import { ASSETS_CDN_URL } from "constants/ThirdPartyConstants";

describe("correctly migrate dsl", () => {
  it("transformDSL for private widget", () => {
    const currentVersion = 49; // before adding privateWidgets to all List widgets
    const nextVersion = LATEST_PAGE_VERSION; // It runs Two Migrations, Always Update as migration increases
    const currentDSL: ContainerWidgetProps<WidgetProps> = {
      backgroundColor: "none",
      bottomRow: 740,
      canExtend: true,
      children: [
        {
          widgetName: "Input1",
          displayName: "Input",
          iconSVG: "/static/media/icon.9f505595.svg",
          topRow: 18,
          bottomRow: 22,
          parentRowSpace: 10,
          autoFocus: false,
          type: "INPUT_WIDGET",
          hideCard: false,
          animateLoading: true,
          parentColumnSpace: 15.0625,
          dynamicTriggerPathList: [],
          resetOnSubmit: true,
          leftColumn: 23,
          dynamicBindingPathList: [],
          labelStyle: "",
          inputType: "TEXT",
          isDisabled: false,
          key: "ftefjorusw",
          isRequired: false,
          rightColumn: 43,
          widgetId: "lz9hvhcltl",
          isVisible: true,
          label: "",
          allowCurrencyChange: false,
          version: 1,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          iconAlign: "left",
          defaultText: "",
        },
        {
          widgetName: "Button1",
          onClick:
            '{{Api1.run(()=>{\ndownload((\nfunction(){\nreturn ""\n}\n)(), "test.png", "image/png")\n})}}',
          buttonColor: "#03B365",
          dynamicPropertyPathList: [
            {
              key: "onClick",
            },
          ],
          displayName: "Button",
          iconSVG: "/static/media/icon.cca02633.svg",
          topRow: 29,
          bottomRow: 33,
          tooltip: "",
          parentRowSpace: 10,
          type: "BUTTON_WIDGET",
          hideCard: false,
          animateLoading: true,
          parentColumnSpace: 14.0625,
          dynamicTriggerPathList: [
            {
              key: "onClick",
            },
          ],
          leftColumn: 20,
          dynamicBindingPathList: [],
          text: "Submit",
          isDisabled: false,
          key: "pg01cxraj1",
          rightColumn: 36,
          isDefaultClickDisabled: true,
          widgetId: "d229q1ydul",
          isVisible: true,
          recaptchaType: "V3",
          version: 1,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          buttonVariant: "PRIMARY",
          placement: "CENTER",
        },
        {
          widgetName: "Input2",
          displayName: "Input",
          iconSVG: "/static/media/icon.9f505595.svg",
          topRow: 44,
          bottomRow: 48,
          parentRowSpace: 10,
          autoFocus: false,
          type: "INPUT_WIDGET",
          hideCard: false,
          animateLoading: true,
          parentColumnSpace: 14.0625,
          resetOnSubmit: true,
          leftColumn: 9,
          labelStyle: "",
          inputType: "TEXT",
          isDisabled: false,
          key: "519sr07k1u",
          isRequired: false,
          rightColumn: 29,
          widgetId: "eenq4c022d",
          isVisible: true,
          label: "",
          allowCurrencyChange: false,
          version: 1,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          iconAlign: "left",
          defaultText: "",
        },
        {
          version: 1,
          template: {
            Image1: {
              isVisible: true,
              defaultImage: `${ASSETS_CDN_URL}/widgets/default.png`,
              imageShape: "RECTANGLE",
              maxZoomLevel: 1,
              enableRotation: false,
              enableDownload: false,
              objectFit: "contain",
              image: "{{List1.listData.map((currentItem) => currentItem.img)}}",
              widgetName: "Image1",
              version: 1,
              animateLoading: true,
              type: "IMAGE_WIDGET",
              hideCard: false,
              displayName: "Image",
              key: "9cn4ooadxj",
              iconSVG: "/static/media/icon.52d8fb96.svg",
              dynamicBindingPathList: [
                {
                  key: "image",
                },
              ],
              dynamicTriggerPathList: [],
              widgetId: "yqofym38tn",
              renderMode: "CANVAS",
              isLoading: false,
              leftColumn: 0,
              rightColumn: 16,
              topRow: 0,
              bottomRow: 8.4,
              parentId: "vqn2okwc6a",
            },
            Text1: {
              isVisible: true,
              text: "{{List1.listData.map((currentItem) => currentItem.name)}}",
              fontSize: "PARAGRAPH",
              fontStyle: "BOLD",
              textAlign: "LEFT",
              textColor: "#231F20",
              truncateButtonColor: "#FFC13D",
              widgetName: "Text1",
              shouldScroll: false,
              shouldTruncate: false,
              version: 1,
              animateLoading: true,
              type: "TEXT_WIDGET",
              fontFamily: "System Default",
              hideCard: false,
              displayName: "Text",
              key: "yd217bk315",
              iconSVG: "/static/media/icon.97c59b52.svg",
              textStyle: "HEADING",
              dynamicBindingPathList: [
                {
                  key: "text",
                },
              ],
              dynamicTriggerPathList: [],
              widgetId: "zeqf6yfm3s",
              renderMode: "CANVAS",
              isLoading: false,
              leftColumn: 16,
              rightColumn: 28,
              topRow: 0,
              bottomRow: 4,
              parentId: "vqn2okwc6a",
            },
            Text2: {
              isVisible: true,
              text: "{{List1.listData.map((currentItem) => currentItem.id)}}",
              fontSize: "PARAGRAPH",
              fontStyle: "BOLD",
              textAlign: "LEFT",
              textColor: "#231F20",
              truncateButtonColor: "#FFC13D",
              widgetName: "Text2",
              shouldScroll: false,
              shouldTruncate: false,
              version: 1,
              animateLoading: true,
              type: "TEXT_WIDGET",
              fontFamily: "System Default",
              hideCard: false,
              displayName: "Text",
              key: "yd217bk315",
              iconSVG: "/static/media/icon.97c59b52.svg",
              textStyle: "BODY",
              dynamicBindingPathList: [
                {
                  key: "text",
                },
              ],
              dynamicTriggerPathList: [],
              widgetId: "8wyekp2o6e",
              renderMode: "CANVAS",
              isLoading: false,
              leftColumn: 16,
              rightColumn: 24,
              topRow: 4,
              bottomRow: 8,
              parentId: "vqn2okwc6a",
            },
          },
          widgetName: "List1",
          listData: [
            {
              id: "001",
              name: "Blue",
              img: `${ASSETS_CDN_URL}/widgets/default.png`,
            },
            {
              id: "002",
              name: "Green",
              img: `${ASSETS_CDN_URL}/widgets/default.png`,
            },
            {
              id: "003",
              name: "Red",
              img: `${ASSETS_CDN_URL}/widgets/default.png`,
            },
          ],
          isCanvas: true,
          displayName: "List",
          iconSVG: "/static/media/icon.9925ee17.svg",
          topRow: 34,
          bottomRow: 74,
          parentRowSpace: 10,
          type: "LIST_WIDGET",
          hideCard: false,
          gridGap: 0,
          animateLoading: true,
          parentColumnSpace: 14.0625,
          leftColumn: 39,
          dynamicBindingPathList: [
            {
              key: "template.Image1.image",
            },
            {
              key: "template.Text1.text",
            },
            {
              key: "template.Text2.text",
            },
          ],
          gridType: "vertical",
          enhancements: true,
          children: [
            {
              widgetName: "Canvas1",
              displayName: "Canvas",
              topRow: 0,
              bottomRow: 400,
              parentRowSpace: 1,
              type: "CANVAS_WIDGET",
              canExtend: false,
              hideCard: true,
              dropDisabled: true,
              openParentPropertyPane: true,
              minHeight: 400,
              noPad: true,
              parentColumnSpace: 1,
              leftColumn: 0,
              children: [
                {
                  boxShadow: "NONE",
                  widgetName: "Container1",
                  borderColor: "transparent",
                  disallowCopy: true,
                  isCanvas: true,
                  displayName: "Container",
                  iconSVG: "/static/media/icon.1977dca3.svg",
                  topRow: 0,
                  bottomRow: 12,
                  dragDisabled: true,
                  type: "CONTAINER_WIDGET",
                  hideCard: false,
                  openParentPropertyPane: true,
                  isDeletable: false,
                  animateLoading: true,
                  leftColumn: 0,
                  children: [
                    {
                      widgetName: "Canvas2",
                      detachFromLayout: true,
                      displayName: "Canvas",
                      widgetId: "vqn2okwc6a",
                      containerStyle: "none",
                      topRow: 0,
                      parentRowSpace: 1,
                      isVisible: true,
                      type: "CANVAS_WIDGET",
                      canExtend: false,
                      version: 1,
                      hideCard: true,
                      parentId: "9e77epyavg",
                      renderMode: "CANVAS",
                      isLoading: false,
                      parentColumnSpace: 1,
                      leftColumn: 0,
                      children: [
                        {
                          widgetName: "Image1",
                          displayName: "Image",
                          iconSVG: "/static/media/icon.52d8fb96.svg",
                          topRow: 0,
                          bottomRow: 8.4,
                          type: "IMAGE_WIDGET",
                          hideCard: false,
                          animateLoading: true,
                          dynamicTriggerPathList: [],
                          imageShape: "RECTANGLE",
                          dynamicBindingPathList: [
                            {
                              key: "image",
                            },
                          ],
                          leftColumn: 0,
                          defaultImage: `${ASSETS_CDN_URL}/widgets/default.png`,
                          key: "9cn4ooadxj",
                          image: "{{currentItem.img}}",
                          rightColumn: 16,
                          objectFit: "contain",
                          widgetId: "yqofym38tn",
                          logBlackList: {
                            isVisible: true,
                            defaultImage: true,
                            imageShape: true,
                            maxZoomLevel: true,
                            enableRotation: true,
                            enableDownload: true,
                            objectFit: true,
                            image: true,
                            widgetName: true,
                            version: true,
                            animateLoading: true,
                            type: true,
                            hideCard: true,
                            displayName: true,
                            key: true,
                            iconSVG: true,
                            isCanvas: true,
                            dynamicBindingPathList: true,
                            dynamicTriggerPathList: true,
                            minHeight: true,
                            widgetId: true,
                            renderMode: true,
                            isLoading: true,
                            parentColumnSpace: true,
                            parentRowSpace: true,
                            leftColumn: true,
                            rightColumn: true,
                            topRow: true,
                            bottomRow: true,
                            parentId: true,
                          },
                          isVisible: true,
                          version: 1,
                          parentId: "vqn2okwc6a",
                          renderMode: "CANVAS",
                          isLoading: false,
                          maxZoomLevel: 1,
                          enableDownload: false,
                          enableRotation: false,
                        },
                        {
                          widgetName: "Text1",
                          displayName: "Text",
                          iconSVG: "/static/media/icon.97c59b52.svg",
                          topRow: 0,
                          bottomRow: 4,
                          type: "TEXT_WIDGET",
                          fontFamily: "System Default",
                          hideCard: false,
                          animateLoading: true,
                          dynamicTriggerPathList: [],
                          dynamicBindingPathList: [
                            {
                              key: "text",
                            },
                          ],
                          leftColumn: 16,
                          shouldTruncate: false,
                          truncateButtonColor: "#FFC13D",
                          text: "{{currentItem.name}}",
                          key: "yd217bk315",
                          rightColumn: 28,
                          textAlign: "LEFT",
                          widgetId: "zeqf6yfm3s",
                          logBlackList: {
                            isVisible: true,
                            text: true,
                            fontSize: true,
                            fontStyle: true,
                            textAlign: true,
                            textColor: true,
                            truncateButtonColor: true,
                            widgetName: true,
                            shouldScroll: true,
                            shouldTruncate: true,
                            version: true,
                            animateLoading: true,
                            type: true,
                            hideCard: true,
                            displayName: true,
                            key: true,
                            iconSVG: true,
                            isCanvas: true,
                            textStyle: true,
                            dynamicBindingPathList: true,
                            dynamicTriggerPathList: true,
                            minHeight: true,
                            widgetId: true,
                            renderMode: true,
                            isLoading: true,
                            parentColumnSpace: true,
                            parentRowSpace: true,
                            leftColumn: true,
                            rightColumn: true,
                            topRow: true,
                            bottomRow: true,
                            parentId: true,
                          },
                          isVisible: true,
                          fontStyle: "BOLD",
                          textColor: "#231F20",
                          shouldScroll: false,
                          version: 1,
                          parentId: "vqn2okwc6a",
                          renderMode: "CANVAS",
                          isLoading: false,
                          fontSize: "PARAGRAPH",
                          textStyle: "HEADING",
                        },
                        {
                          widgetName: "Text2",
                          displayName: "Text",
                          iconSVG: "/static/media/icon.97c59b52.svg",
                          topRow: 4,
                          bottomRow: 8,
                          type: "TEXT_WIDGET",
                          fontFamily: "System Default",
                          hideCard: false,
                          animateLoading: true,
                          dynamicTriggerPathList: [],
                          dynamicBindingPathList: [
                            {
                              key: "text",
                            },
                          ],
                          leftColumn: 16,
                          shouldTruncate: false,
                          truncateButtonColor: "#FFC13D",
                          text: "{{currentItem.id}}",
                          dynamicHeight: "FIXED",
                          maxDynamicHeight: 9000,
                          minDynamicHeight: 4,
                          key: "yd217bk315",
                          rightColumn: 24,
                          textAlign: "LEFT",
                          widgetId: "8wyekp2o6e",
                          logBlackList: {
                            isVisible: true,
                            text: true,
                            fontSize: true,
                            fontStyle: true,
                            textAlign: true,
                            textColor: true,
                            truncateButtonColor: true,
                            widgetName: true,
                            shouldScroll: true,
                            shouldTruncate: true,
                            version: true,
                            animateLoading: true,
                            type: true,
                            hideCard: true,
                            displayName: true,
                            key: true,
                            iconSVG: true,
                            isCanvas: true,
                            textStyle: true,
                            dynamicBindingPathList: true,
                            dynamicTriggerPathList: true,
                            minHeight: true,
                            widgetId: true,
                            renderMode: true,
                            isLoading: true,
                            parentColumnSpace: true,
                            parentRowSpace: true,
                            leftColumn: true,
                            rightColumn: true,
                            topRow: true,
                            bottomRow: true,
                            parentId: true,
                          },
                          isVisible: true,
                          fontStyle: "BOLD",
                          textColor: "#231F20",
                          shouldScroll: false,
                          version: 1,
                          parentId: "vqn2okwc6a",
                          renderMode: "CANVAS",
                          isLoading: false,
                          fontSize: "PARAGRAPH",
                          textStyle: "BODY",
                        },
                      ],
                      key: "omhgz5cakp",
                    },
                  ],
                  borderWidth: "0",
                  key: "ca3a42k2a4",
                  disablePropertyPane: true,
                  backgroundColor: "white",
                  rightColumn: 64,
                  widgetId: "9e77epyavg",
                  containerStyle: "card",
                  isVisible: true,
                  version: 1,
                  parentId: "q3ype57cdo",
                  renderMode: "CANVAS",
                  isLoading: false,
                  borderRadius: "0",
                },
              ],
              key: "omhgz5cakp",
              rightColumn: 337.5,
              detachFromLayout: true,
              widgetId: "q3ype57cdo",
              containerStyle: "none",
              isVisible: true,
              version: 1,
              parentId: "iupz1d99ka",
              renderMode: "CANVAS",
              isLoading: false,
            },
          ],
          key: "axex98spx3",
          backgroundColor: "transparent",
          rightColumn: 63,
          itemBackgroundColor: "#FFFFFF",
          widgetId: "iupz1d99ka",
          isVisible: true,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
        },
      ],
      containerStyle: "none",
      detachFromLayout: true,
      dynamicBindingPathList: [],
      dynamicTriggerPathList: [],
      leftColumn: 0,
      minHeight: 640,
      parentColumnSpace: 1,
      parentRowSpace: 1,
      rightColumn: 912,
      snapColumns: 64,
      snapRows: 125,
      topRow: 0,
      type: "CANVAS_WIDGET",
      version: currentVersion,
      widgetId: "0",
      widgetName: "MainContainer",
      renderMode: "CANVAS",
      isLoading: false,
    };

    const expectedNextDSL: ContainerWidgetProps<WidgetProps> = {
      backgroundColor: "none",
      bottomRow: 740,
      canExtend: true,
      version: nextVersion,
      children: [
        {
          widgetName: "Input1",
          displayName: "Input",
          iconSVG: "/static/media/icon.9f505595.svg",
          topRow: 18,
          bottomRow: 22,
          parentRowSpace: 10,
          autoFocus: false,
          type: "INPUT_WIDGET",
          hideCard: false,
          animateLoading: true,
          parentColumnSpace: 15.0625,
          dynamicTriggerPathList: [],
          resetOnSubmit: true,
          leftColumn: 23,
          labelTextSize: "0.875rem",
          dynamicBindingPathList: [
            {
              key: "accentColor",
            },
          ],
          labelStyle: "",
          inputType: "TEXT",
          isDisabled: false,
          key: "ftefjorusw",
          isRequired: false,
          rightColumn: 43,
          widgetId: "lz9hvhcltl",
          isVisible: true,
          label: "",
          allowCurrencyChange: false,
          version: 1,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          iconAlign: "left",
          defaultText: "",
          borderRadius: "0px",
          boxShadow: "none",
          accentColor: "{{appsmith.theme.colors.primaryColor}}",
        },
        {
          widgetName: "Button1",
          onClick:
            '{{Api1.run(()=>{\ndownload((\nfunction(){\nreturn ""\n}\n)(), "test.png", "image/png")\n})}}',
          buttonColor: "#03B365",
          dynamicPropertyPathList: [
            {
              key: "onClick",
            },
          ],
          displayName: "Button",
          iconSVG: "/static/media/icon.cca02633.svg",
          topRow: 29,
          bottomRow: 33,
          tooltip: "",
          parentRowSpace: 10,
          type: "BUTTON_WIDGET",
          hideCard: false,
          animateLoading: true,
          parentColumnSpace: 14.0625,
          dynamicTriggerPathList: [
            {
              key: "onClick",
            },
          ],
          leftColumn: 20,
          dynamicBindingPathList: [],
          text: "Submit",
          isDisabled: false,
          key: "pg01cxraj1",
          labelTextSize: "0.875rem",
          rightColumn: 36,
          isDefaultClickDisabled: true,
          widgetId: "d229q1ydul",
          isVisible: true,
          recaptchaType: "V3",
          version: 1,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          buttonVariant: "PRIMARY",
          placement: "CENTER",
          borderRadius: "0px",
          boxShadow: "none",
        },
        {
          widgetName: "Input2",
          displayName: "Input",
          iconSVG: "/static/media/icon.9f505595.svg",
          topRow: 44,
          bottomRow: 48,
          parentRowSpace: 10,
          autoFocus: false,
          type: "INPUT_WIDGET",
          hideCard: false,
          animateLoading: true,
          parentColumnSpace: 14.0625,
          resetOnSubmit: true,
          leftColumn: 9,
          labelTextSize: "0.875rem",
          labelStyle: "",
          inputType: "TEXT",
          isDisabled: false,
          key: "519sr07k1u",
          isRequired: false,
          rightColumn: 29,
          widgetId: "eenq4c022d",
          isVisible: true,
          label: "",
          allowCurrencyChange: false,
          version: 1,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          iconAlign: "left",
          defaultText: "",
          borderRadius: "0px",
          boxShadow: "none",
          accentColor: "{{appsmith.theme.colors.primaryColor}}",
          dynamicBindingPathList: [
            {
              key: "accentColor",
            },
          ],
        },
        {
          widgetName: "List1",
          template: {
            Image1: {
              isVisible: true,
              defaultImage: `${ASSETS_CDN_URL}/widgets/default.png`,
              imageShape: "RECTANGLE",
              maxZoomLevel: 1,
              enableRotation: false,
              enableDownload: false,
              objectFit: "contain",
              image: "{{List1.listData.map((currentItem) => currentItem.img)}}",
              widgetName: "Image1",
              version: 1,
              animateLoading: true,
              type: "IMAGE_WIDGET",
              hideCard: false,
              displayName: "Image",
              key: "9cn4ooadxj",
              iconSVG: "/static/media/icon.52d8fb96.svg",
              dynamicBindingPathList: [
                {
                  key: "image",
                },
              ],
              dynamicTriggerPathList: [],
              widgetId: "yqofym38tn",
              renderMode: "CANVAS",
              isLoading: false,
              leftColumn: 0,
              rightColumn: 16,
              topRow: 0,
              bottomRow: 8.4,
              parentId: "vqn2okwc6a",
            },
            Text1: {
              isVisible: true,
              text: "{{List1.listData.map((currentItem) => currentItem.name)}}",
              fontSize: "PARAGRAPH",
              fontStyle: "BOLD",
              textAlign: "LEFT",
              textColor: "#231F20",
              truncateButtonColor: "#FFC13D",
              widgetName: "Text1",
              shouldScroll: false,
              shouldTruncate: false,
              version: 1,
              animateLoading: true,
              type: "TEXT_WIDGET",
              fontFamily: "System Default",
              hideCard: false,
              displayName: "Text",
              key: "yd217bk315",
              iconSVG: "/static/media/icon.97c59b52.svg",
              textStyle: "HEADING",
              dynamicBindingPathList: [
                {
                  key: "text",
                },
              ],
              dynamicTriggerPathList: [],
              widgetId: "zeqf6yfm3s",
              renderMode: "CANVAS",
              isLoading: false,
              leftColumn: 16,
              rightColumn: 28,
              topRow: 0,
              bottomRow: 4,
              parentId: "vqn2okwc6a",
            },
            Text2: {
              isVisible: true,
              text: "{{List1.listData.map((currentItem) => currentItem.id)}}",
              fontSize: "PARAGRAPH",
              fontStyle: "BOLD",
              textAlign: "LEFT",
              textColor: "#231F20",
              truncateButtonColor: "#FFC13D",
              widgetName: "Text2",
              shouldScroll: false,
              shouldTruncate: false,
              version: 1,
              animateLoading: true,
              type: "TEXT_WIDGET",
              fontFamily: "System Default",
              hideCard: false,
              displayName: "Text",
              key: "yd217bk315",
              iconSVG: "/static/media/icon.97c59b52.svg",
              textStyle: "BODY",
              dynamicBindingPathList: [
                {
                  key: "text",
                },
              ],
              dynamicTriggerPathList: [],
              widgetId: "8wyekp2o6e",
              renderMode: "CANVAS",
              isLoading: false,
              leftColumn: 16,
              rightColumn: 24,
              topRow: 4,
              bottomRow: 8,
              parentId: "vqn2okwc6a",
            },
          },
          listData: [
            {
              id: "001",
              name: "Blue",
              img: `${ASSETS_CDN_URL}/widgets/default.png`,
            },
            {
              id: "002",
              name: "Green",
              img: `${ASSETS_CDN_URL}/widgets/default.png`,
            },
            {
              id: "003",
              name: "Red",
              img: `${ASSETS_CDN_URL}/widgets/default.png`,
            },
          ],
          isCanvas: true,
          displayName: "List",
          iconSVG: "/static/media/icon.9925ee17.svg",
          topRow: 34,
          bottomRow: 74,
          parentRowSpace: 10,
          type: "LIST_WIDGET",
          hideCard: false,
          gridGap: 0,
          animateLoading: true,
          parentColumnSpace: 14.0625,
          leftColumn: 39,
          dynamicBindingPathList: [
            {
              key: "template.Image1.image",
            },
            {
              key: "template.Text1.text",
            },
            {
              key: "template.Text2.text",
            },
            {
              key: "accentColor",
            },
          ],
          gridType: "vertical",
          enhancements: true,
          children: [
            {
              widgetName: "Canvas1",
              displayName: "Canvas",
              topRow: 0,
              bottomRow: 400,
              parentRowSpace: 1,
              type: "CANVAS_WIDGET",
              canExtend: false,
              hideCard: true,
              dropDisabled: true,
              openParentPropertyPane: true,
              minHeight: 400,
              noPad: true,
              parentColumnSpace: 1,
              leftColumn: 0,
              children: [
                {
                  boxShadow: "none",
                  widgetName: "Container1",
                  borderColor: "transparent",
                  disallowCopy: true,
                  isCanvas: true,
                  displayName: "Container",
                  iconSVG: "/static/media/icon.1977dca3.svg",
                  dynamicPropertyPathList: [
                    {
                      key: "borderRadius",
                    },
                  ],
                  topRow: 0,
                  bottomRow: 12,
                  dragDisabled: true,
                  type: "CONTAINER_WIDGET",
                  hideCard: false,
                  openParentPropertyPane: true,
                  isDeletable: false,
                  animateLoading: true,
                  leftColumn: 0,
                  dynamicHeight: "FIXED",
                  maxDynamicHeight: 9000,
                  minDynamicHeight: 4,
                  children: [
                    {
                      widgetName: "Canvas2",
                      detachFromLayout: true,
                      displayName: "Canvas",
                      widgetId: "vqn2okwc6a",
                      containerStyle: "none",
                      topRow: 0,
                      parentRowSpace: 1,
                      isVisible: true,
                      type: "CANVAS_WIDGET",
                      canExtend: false,
                      version: 1,
                      hideCard: true,
                      parentId: "9e77epyavg",
                      renderMode: "CANVAS",
                      isLoading: false,
                      parentColumnSpace: 1,
                      leftColumn: 0,
                      children: [
                        {
                          widgetName: "Image1",
                          displayName: "Image",
                          iconSVG: "/static/media/icon.52d8fb96.svg",
                          topRow: 0,
                          bottomRow: 8.4,
                          type: "IMAGE_WIDGET",
                          hideCard: false,
                          animateLoading: true,
                          dynamicTriggerPathList: [],
                          imageShape: "RECTANGLE",
                          dynamicBindingPathList: [
                            {
                              key: "image",
                            },
                          ],
                          leftColumn: 0,
                          defaultImage: `${ASSETS_CDN_URL}/widgets/default.png`,
                          key: "9cn4ooadxj",
                          labelTextSize: "0.875rem",
                          image: "{{currentItem.img}}",
                          rightColumn: 16,
                          objectFit: "contain",
                          widgetId: "yqofym38tn",
                          logBlackList: {
                            isVisible: true,
                            defaultImage: true,
                            imageShape: true,
                            maxZoomLevel: true,
                            enableRotation: true,
                            enableDownload: true,
                            objectFit: true,
                            image: true,
                            widgetName: true,
                            version: true,
                            animateLoading: true,
                            type: true,
                            hideCard: true,
                            displayName: true,
                            key: true,
                            iconSVG: true,
                            isCanvas: true,
                            dynamicBindingPathList: true,
                            dynamicTriggerPathList: true,
                            minHeight: true,
                            widgetId: true,
                            renderMode: true,
                            isLoading: true,
                            parentColumnSpace: true,
                            parentRowSpace: true,
                            leftColumn: true,
                            rightColumn: true,
                            topRow: true,
                            bottomRow: true,
                            parentId: true,
                          },
                          isVisible: true,
                          version: 1,
                          parentId: "vqn2okwc6a",
                          renderMode: "CANVAS",
                          isLoading: false,
                          maxZoomLevel: 1,
                          enableDownload: false,
                          enableRotation: false,
                          borderRadius: "0px",
                          boxShadow: "none",
                          dynamicHeight: "FIXED",
                        },
                        {
                          widgetName: "Text1",
                          displayName: "Text",
                          iconSVG: "/static/media/icon.97c59b52.svg",
                          topRow: 0,
                          bottomRow: 4,
                          type: "TEXT_WIDGET",
                          fontFamily: "System Default",
                          hideCard: false,
                          animateLoading: true,
                          dynamicTriggerPathList: [],
                          dynamicBindingPathList: [
                            {
                              key: "text",
                            },
                          ],
                          dynamicHeight: "FIXED",
                          maxDynamicHeight: 9000,
                          minDynamicHeight: 4,
                          leftColumn: 16,
                          truncateButtonColor: "#FFC13D",
                          text: "{{currentItem.name}}",
                          key: "yd217bk315",
                          labelTextSize: "0.875rem",
                          rightColumn: 28,
                          textAlign: "LEFT",
                          widgetId: "zeqf6yfm3s",
                          logBlackList: {
                            isVisible: true,
                            text: true,
                            fontSize: true,
                            fontStyle: true,
                            textAlign: true,
                            textColor: true,
                            truncateButtonColor: true,
                            widgetName: true,
                            shouldScroll: true,
                            shouldTruncate: true,
                            version: true,
                            animateLoading: true,
                            type: true,
                            hideCard: true,
                            displayName: true,
                            key: true,
                            iconSVG: true,
                            isCanvas: true,
                            textStyle: true,
                            dynamicBindingPathList: true,
                            dynamicTriggerPathList: true,
                            minHeight: true,
                            widgetId: true,
                            renderMode: true,
                            isLoading: true,
                            parentColumnSpace: true,
                            parentRowSpace: true,
                            leftColumn: true,
                            rightColumn: true,
                            topRow: true,
                            bottomRow: true,
                            parentId: true,
                          },
                          isVisible: true,
                          fontStyle: "BOLD",
                          textColor: "#231F20",
                          overflow: OverflowTypes.NONE,
                          version: 1,
                          parentId: "vqn2okwc6a",
                          renderMode: "CANVAS",
                          isLoading: false,
                          fontSize: "0.875rem",
                          textStyle: "HEADING",
                          borderRadius: "0px",
                          boxShadow: "none",
                        },
                        {
                          widgetName: "Text2",
                          displayName: "Text",
                          iconSVG: "/static/media/icon.97c59b52.svg",
                          topRow: 4,
                          bottomRow: 8,
                          type: "TEXT_WIDGET",
                          fontFamily: "System Default",
                          hideCard: false,
                          animateLoading: true,
                          dynamicTriggerPathList: [],
                          dynamicBindingPathList: [
                            {
                              key: "text",
                            },
                          ],
                          dynamicHeight: "FIXED",
                          maxDynamicHeight: 9000,
                          minDynamicHeight: 4,
                          leftColumn: 16,
                          truncateButtonColor: "#FFC13D",
                          text: "{{currentItem.id}}",
                          key: "yd217bk315",
                          labelTextSize: "0.875rem",
                          rightColumn: 24,
                          textAlign: "LEFT",
                          widgetId: "8wyekp2o6e",
                          logBlackList: {
                            isVisible: true,
                            text: true,
                            fontSize: true,
                            fontStyle: true,
                            textAlign: true,
                            textColor: true,
                            truncateButtonColor: true,
                            widgetName: true,
                            shouldScroll: true,
                            shouldTruncate: true,
                            version: true,
                            animateLoading: true,
                            type: true,
                            hideCard: true,
                            displayName: true,
                            key: true,
                            iconSVG: true,
                            isCanvas: true,
                            textStyle: true,
                            dynamicBindingPathList: true,
                            dynamicTriggerPathList: true,
                            minHeight: true,
                            widgetId: true,
                            renderMode: true,
                            isLoading: true,
                            parentColumnSpace: true,
                            parentRowSpace: true,
                            leftColumn: true,
                            rightColumn: true,
                            topRow: true,
                            bottomRow: true,
                            parentId: true,
                          },
                          isVisible: true,
                          fontStyle: "BOLD",
                          textColor: "#231F20",
                          overflow: OverflowTypes.NONE,
                          version: 1,
                          parentId: "vqn2okwc6a",
                          renderMode: "CANVAS",
                          isLoading: false,
                          fontSize: "0.875rem",
                          textStyle: "BODY",
                          borderRadius: "0px",
                          boxShadow: "none",
                        },
                      ],
                      key: "omhgz5cakp",
                      labelTextSize: "0.875rem",
                      borderRadius: "0px",
                      boxShadow: "none",
                    },
                  ],
                  borderWidth: "0",
                  key: "ca3a42k2a4",
                  labelTextSize: "0.875rem",
                  disablePropertyPane: true,
                  backgroundColor: "white",
                  rightColumn: 64,
                  widgetId: "9e77epyavg",
                  containerStyle: "card",
                  isVisible: true,
                  version: 1,
                  parentId: "q3ype57cdo",
                  renderMode: "CANVAS",
                  isLoading: false,
                  borderRadius: "0px",
                },
              ],
              key: "omhgz5cakp",
              labelTextSize: "0.875rem",
              rightColumn: 337.5,
              detachFromLayout: true,
              widgetId: "q3ype57cdo",
              containerStyle: "none",
              isVisible: true,
              version: 1,
              parentId: "iupz1d99ka",
              renderMode: "CANVAS",
              isLoading: false,
              borderRadius: "0px",
              boxShadow: "none",
            },
          ],
          privateWidgets: {
            Image1: true,
            Text1: true,
            Text2: true,
          },
          key: "axex98spx3",
          labelTextSize: "0.875rem",
          backgroundColor: "transparent",
          rightColumn: 63,
          itemBackgroundColor: "#FFFFFF",
          widgetId: "iupz1d99ka",
          isVisible: true,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          version: 1,
          borderRadius: "0px",
          boxShadow: "none",
          accentColor: "{{appsmith.theme.colors.primaryColor}}",
        },
      ],
      containerStyle: "none",
      detachFromLayout: true,
      dynamicBindingPathList: [],
      dynamicTriggerPathList: [],
      leftColumn: 0,
      minHeight: 640,
      parentColumnSpace: 1,
      parentRowSpace: 1,
      rightColumn: 912,
      snapColumns: 64,
      snapRows: 125,
      topRow: 0,
      type: "CANVAS_WIDGET",
      widgetId: "0",
      widgetName: "MainContainer",
      renderMode: RenderModes.CANVAS,
      isLoading: false,
    };

    const actualNextDsl = transformDSL(currentDSL);

    expect(actualNextDsl).toEqual(expectedNextDSL);
  });

  it("transformDSL for theming v1", () => {
    const currentVersion = 53;
    const nextVersion = LATEST_PAGE_VERSION;
    const currentDSL: ContainerWidgetProps<WidgetProps> = {
      backgroundColor: "none",
      bottomRow: 740,
      canExtend: true,
      children: [
        {
          widgetName: "Input1",
          displayName: "Input",
          iconSVG: "/static/media/icon.9f505595.svg",
          topRow: 18,
          bottomRow: 22,
          parentRowSpace: 10,
          autoFocus: false,
          type: "INPUT_WIDGET",
          hideCard: false,
          animateLoading: true,
          parentColumnSpace: 15.0625,
          dynamicTriggerPathList: [],
          resetOnSubmit: true,
          leftColumn: 23,
          dynamicBindingPathList: [],
          labelStyle: "",
          inputType: "TEXT",
          isDisabled: false,
          key: "ftefjorusw",
          isRequired: false,
          rightColumn: 43,
          widgetId: "lz9hvhcltl",
          isVisible: true,
          label: "",
          allowCurrencyChange: false,
          version: 1,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          iconAlign: "left",
          defaultText: "",
        },
        {
          widgetName: "Button1",
          onClick:
            '{{Api1.run(()=>{\ndownload((\nfunction(){\nreturn ""\n}\n)(), "test.png", "image/png")\n})}}',
          buttonColor: "#03B365",
          dynamicPropertyPathList: [
            {
              key: "onClick",
            },
          ],
          displayName: "Button",
          iconSVG: "/static/media/icon.cca02633.svg",
          topRow: 29,
          bottomRow: 33,
          tooltip: "",
          parentRowSpace: 10,
          type: "BUTTON_WIDGET",
          hideCard: false,
          animateLoading: true,
          parentColumnSpace: 14.0625,
          dynamicTriggerPathList: [
            {
              key: "onClick",
            },
          ],
          leftColumn: 20,
          dynamicBindingPathList: [],
          text: "Submit",
          isDisabled: false,
          key: "pg01cxraj1",
          rightColumn: 36,
          isDefaultClickDisabled: true,
          widgetId: "d229q1ydul",
          isVisible: true,
          recaptchaType: "V3",
          version: 1,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          buttonVariant: "PRIMARY",
          placement: "CENTER",
        },
        {
          widgetName: "Input2",
          displayName: "Input",
          iconSVG: "/static/media/icon.9f505595.svg",
          topRow: 44,
          bottomRow: 48,
          parentRowSpace: 10,
          autoFocus: false,
          type: "INPUT_WIDGET",
          hideCard: false,
          animateLoading: true,
          parentColumnSpace: 14.0625,
          resetOnSubmit: true,
          leftColumn: 9,
          labelStyle: "",
          inputType: "TEXT",
          isDisabled: false,
          key: "519sr07k1u",
          isRequired: false,
          rightColumn: 29,
          widgetId: "eenq4c022d",
          isVisible: true,
          label: "",
          allowCurrencyChange: false,
          version: 1,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          iconAlign: "left",
          defaultText: "",
        },
        {
          version: 1,
          template: {
            Image1: {
              isVisible: true,
              defaultImage: `${ASSETS_CDN_URL}/widgets/default.png`,
              imageShape: "RECTANGLE",
              maxZoomLevel: 1,
              enableRotation: false,
              enableDownload: false,
              objectFit: "contain",
              image: "{{List1.listData.map((currentItem) => currentItem.img)}}",
              widgetName: "Image1",
              version: 1,
              animateLoading: true,
              type: "IMAGE_WIDGET",
              hideCard: false,
              displayName: "Image",
              key: "9cn4ooadxj",
              iconSVG: "/static/media/icon.52d8fb96.svg",
              dynamicBindingPathList: [
                {
                  key: "image",
                },
              ],
              dynamicTriggerPathList: [],
              widgetId: "yqofym38tn",
              renderMode: "CANVAS",
              isLoading: false,
              leftColumn: 0,
              rightColumn: 16,
              topRow: 0,
              bottomRow: 8.4,
              parentId: "vqn2okwc6a",
            },
            Text1: {
              isVisible: true,
              text: "{{List1.listData.map((currentItem) => currentItem.name)}}",
              fontSize: "PARAGRAPH",
              fontStyle: "BOLD",
              textAlign: "LEFT",
              textColor: "#231F20",
              truncateButtonColor: "#FFC13D",
              widgetName: "Text1",
              shouldScroll: false,
              shouldTruncate: false,
              version: 1,
              animateLoading: true,
              type: "TEXT_WIDGET",
              fontFamily: "System Default",
              hideCard: false,
              displayName: "Text",
              key: "yd217bk315",
              iconSVG: "/static/media/icon.97c59b52.svg",
              textStyle: "HEADING",
              dynamicBindingPathList: [
                {
                  key: "text",
                },
              ],
              dynamicTriggerPathList: [],
              widgetId: "zeqf6yfm3s",
              renderMode: "CANVAS",
              isLoading: false,
              leftColumn: 16,
              rightColumn: 28,
              topRow: 0,
              bottomRow: 4,
              parentId: "vqn2okwc6a",
            },
            Text2: {
              isVisible: true,
              text: "{{List1.listData.map((currentItem) => currentItem.id)}}",
              fontSize: "PARAGRAPH",
              fontStyle: "BOLD",
              textAlign: "LEFT",
              textColor: "#231F20",
              truncateButtonColor: "#FFC13D",
              widgetName: "Text2",
              shouldScroll: false,
              shouldTruncate: false,
              version: 1,
              animateLoading: true,
              type: "TEXT_WIDGET",
              fontFamily: "System Default",
              hideCard: false,
              displayName: "Text",
              key: "yd217bk315",
              iconSVG: "/static/media/icon.97c59b52.svg",
              textStyle: "BODY",
              dynamicBindingPathList: [
                {
                  key: "text",
                },
              ],
              dynamicTriggerPathList: [],
              widgetId: "8wyekp2o6e",
              renderMode: "CANVAS",
              isLoading: false,
              leftColumn: 16,
              rightColumn: 24,
              topRow: 4,
              bottomRow: 8,
              parentId: "vqn2okwc6a",
            },
          },
          widgetName: "List1",
          listData: [
            {
              id: "001",
              name: "Blue",
              img: `${ASSETS_CDN_URL}/widgets/default.png`,
            },
            {
              id: "002",
              name: "Green",
              img: `${ASSETS_CDN_URL}/widgets/default.png`,
            },
            {
              id: "003",
              name: "Red",
              img: `${ASSETS_CDN_URL}/widgets/default.png`,
            },
          ],
          isCanvas: true,
          displayName: "List",
          iconSVG: "/static/media/icon.9925ee17.svg",
          topRow: 34,
          bottomRow: 74,
          parentRowSpace: 10,
          type: "LIST_WIDGET",
          hideCard: false,
          gridGap: 0,
          animateLoading: true,
          parentColumnSpace: 14.0625,
          leftColumn: 39,
          dynamicBindingPathList: [
            {
              key: "template.Image1.image",
            },
            {
              key: "template.Text1.text",
            },
            {
              key: "template.Text2.text",
            },
          ],
          gridType: "vertical",
          enhancements: true,
          children: [
            {
              widgetName: "Canvas1",
              displayName: "Canvas",
              topRow: 0,
              bottomRow: 400,
              parentRowSpace: 1,
              type: "CANVAS_WIDGET",
              canExtend: false,
              hideCard: true,
              dropDisabled: true,
              openParentPropertyPane: true,
              minHeight: 400,
              noPad: true,
              parentColumnSpace: 1,
              leftColumn: 0,
              children: [
                {
                  boxShadow: "NONE",
                  widgetName: "Container1",
                  borderColor: "transparent",
                  disallowCopy: true,
                  isCanvas: true,
                  displayName: "Container",
                  iconSVG: "/static/media/icon.1977dca3.svg",
                  topRow: 0,
                  bottomRow: 12,
                  dragDisabled: true,
                  type: "CONTAINER_WIDGET",
                  hideCard: false,
                  openParentPropertyPane: true,
                  isDeletable: false,
                  animateLoading: true,
                  leftColumn: 0,
                  children: [
                    {
                      widgetName: "Canvas2",
                      detachFromLayout: true,
                      displayName: "Canvas",
                      widgetId: "vqn2okwc6a",
                      containerStyle: "none",
                      topRow: 0,
                      parentRowSpace: 1,
                      isVisible: true,
                      type: "CANVAS_WIDGET",
                      canExtend: false,
                      version: 1,
                      hideCard: true,
                      parentId: "9e77epyavg",
                      renderMode: "CANVAS",
                      isLoading: false,
                      parentColumnSpace: 1,
                      leftColumn: 0,
                      children: [
                        {
                          widgetName: "Image1",
                          displayName: "Image",
                          iconSVG: "/static/media/icon.52d8fb96.svg",
                          topRow: 0,
                          bottomRow: 8.4,
                          type: "IMAGE_WIDGET",
                          hideCard: false,
                          animateLoading: true,
                          dynamicTriggerPathList: [],
                          imageShape: "RECTANGLE",
                          dynamicBindingPathList: [
                            {
                              key: "image",
                            },
                          ],
                          leftColumn: 0,
                          defaultImage: `${ASSETS_CDN_URL}/widgets/default.png`,
                          key: "9cn4ooadxj",
                          image: "{{currentItem.img}}",
                          rightColumn: 16,
                          objectFit: "contain",
                          widgetId: "yqofym38tn",
                          logBlackList: {
                            isVisible: true,
                            defaultImage: true,
                            imageShape: true,
                            maxZoomLevel: true,
                            enableRotation: true,
                            enableDownload: true,
                            objectFit: true,
                            image: true,
                            widgetName: true,
                            version: true,
                            animateLoading: true,
                            type: true,
                            hideCard: true,
                            displayName: true,
                            key: true,
                            iconSVG: true,
                            isCanvas: true,
                            dynamicBindingPathList: true,
                            dynamicTriggerPathList: true,
                            minHeight: true,
                            widgetId: true,
                            renderMode: true,
                            isLoading: true,
                            parentColumnSpace: true,
                            parentRowSpace: true,
                            leftColumn: true,
                            rightColumn: true,
                            topRow: true,
                            bottomRow: true,
                            parentId: true,
                          },
                          isVisible: true,
                          version: 1,
                          parentId: "vqn2okwc6a",
                          renderMode: "CANVAS",
                          isLoading: false,
                          maxZoomLevel: 1,
                          enableDownload: false,
                          enableRotation: false,
                          dynamicHeight: "FIXED",
                        },
                        {
                          widgetName: "Text1",
                          displayName: "Text",
                          iconSVG: "/static/media/icon.97c59b52.svg",
                          topRow: 0,
                          bottomRow: 4,
                          type: "TEXT_WIDGET",
                          fontFamily: "System Default",
                          hideCard: false,
                          animateLoading: true,
                          dynamicTriggerPathList: [],
                          dynamicBindingPathList: [
                            {
                              key: "text",
                            },
                          ],
                          leftColumn: 16,
                          shouldTruncate: false,
                          truncateButtonColor: "#FFC13D",
                          text: "{{currentItem.name}}",
                          key: "yd217bk315",
                          rightColumn: 28,
                          textAlign: "LEFT",
                          widgetId: "zeqf6yfm3s",
                          logBlackList: {
                            isVisible: true,
                            text: true,
                            fontSize: true,
                            fontStyle: true,
                            textAlign: true,
                            textColor: true,
                            truncateButtonColor: true,
                            widgetName: true,
                            shouldScroll: true,
                            shouldTruncate: true,
                            version: true,
                            animateLoading: true,
                            type: true,
                            hideCard: true,
                            displayName: true,
                            key: true,
                            iconSVG: true,
                            isCanvas: true,
                            textStyle: true,
                            dynamicBindingPathList: true,
                            dynamicTriggerPathList: true,
                            minHeight: true,
                            widgetId: true,
                            renderMode: true,
                            isLoading: true,
                            parentColumnSpace: true,
                            parentRowSpace: true,
                            leftColumn: true,
                            rightColumn: true,
                            topRow: true,
                            bottomRow: true,
                            parentId: true,
                          },
                          isVisible: true,
                          fontStyle: "BOLD",
                          textColor: "#231F20",
                          shouldScroll: false,
                          version: 1,
                          parentId: "vqn2okwc6a",
                          renderMode: "CANVAS",
                          isLoading: false,
                          fontSize: "PARAGRAPH",
                          textStyle: "HEADING",
                          dynamicHeight: "FIXED",
                        },
                        {
                          widgetName: "Text2",
                          displayName: "Text",
                          iconSVG: "/static/media/icon.97c59b52.svg",
                          topRow: 4,
                          bottomRow: 8,
                          type: "TEXT_WIDGET",
                          fontFamily: "System Default",
                          hideCard: false,
                          animateLoading: true,
                          dynamicTriggerPathList: [],
                          dynamicBindingPathList: [
                            {
                              key: "text",
                            },
                          ],
                          leftColumn: 16,
                          shouldTruncate: false,
                          truncateButtonColor: "#FFC13D",
                          text: "{{currentItem.id}}",
                          key: "yd217bk315",
                          rightColumn: 24,
                          textAlign: "LEFT",
                          widgetId: "8wyekp2o6e",
                          logBlackList: {
                            isVisible: true,
                            text: true,
                            fontSize: true,
                            fontStyle: true,
                            textAlign: true,
                            textColor: true,
                            truncateButtonColor: true,
                            widgetName: true,
                            shouldScroll: true,
                            shouldTruncate: true,
                            version: true,
                            animateLoading: true,
                            type: true,
                            hideCard: true,
                            displayName: true,
                            key: true,
                            iconSVG: true,
                            isCanvas: true,
                            textStyle: true,
                            dynamicBindingPathList: true,
                            dynamicTriggerPathList: true,
                            minHeight: true,
                            widgetId: true,
                            renderMode: true,
                            isLoading: true,
                            parentColumnSpace: true,
                            parentRowSpace: true,
                            leftColumn: true,
                            rightColumn: true,
                            topRow: true,
                            bottomRow: true,
                            parentId: true,
                          },
                          isVisible: true,
                          fontStyle: "BOLD",
                          textColor: "#231F20",
                          shouldScroll: false,
                          version: 1,
                          parentId: "vqn2okwc6a",
                          renderMode: "CANVAS",
                          isLoading: false,
                          fontSize: "PARAGRAPH",
                          textStyle: "BODY",
                          dynamicHeight: "FIXED",
                        },
                      ],
                      key: "omhgz5cakp",
                    },
                  ],
                  borderWidth: "0",
                  key: "ca3a42k2a4",
                  disablePropertyPane: true,
                  backgroundColor: "white",
                  rightColumn: 64,
                  widgetId: "9e77epyavg",
                  containerStyle: "card",
                  isVisible: true,
                  version: 1,
                  parentId: "q3ype57cdo",
                  renderMode: "CANVAS",
                  isLoading: false,
                  borderRadius: "0",
                },
              ],
              key: "omhgz5cakp",
              rightColumn: 337.5,
              detachFromLayout: true,
              widgetId: "q3ype57cdo",
              containerStyle: "none",
              isVisible: true,
              version: 1,
              parentId: "iupz1d99ka",
              renderMode: "CANVAS",
              isLoading: false,
            },
          ],
          key: "axex98spx3",
          backgroundColor: "transparent",
          rightColumn: 63,
          itemBackgroundColor: "#FFFFFF",
          widgetId: "iupz1d99ka",
          isVisible: true,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
        },
      ],
      containerStyle: "none",
      detachFromLayout: true,
      dynamicBindingPathList: [],
      dynamicTriggerPathList: [],
      leftColumn: 0,
      minHeight: 640,
      parentColumnSpace: 1,
      parentRowSpace: 1,
      rightColumn: 912,
      snapColumns: 64,
      snapRows: 125,
      topRow: 0,
      type: "CANVAS_WIDGET",
      version: currentVersion,
      widgetId: "0",
      widgetName: "MainContainer",
      renderMode: "CANVAS",
      isLoading: false,
    };

    const expectedNextDSL: ContainerWidgetProps<WidgetProps> = {
      backgroundColor: "none",
      bottomRow: 740,
      canExtend: true,
      version: nextVersion,
      children: [
        {
          widgetName: "Input1",
          displayName: "Input",
          iconSVG: "/static/media/icon.9f505595.svg",
          topRow: 18,
          bottomRow: 22,
          parentRowSpace: 10,
          autoFocus: false,
          type: "INPUT_WIDGET",
          hideCard: false,
          animateLoading: true,
          parentColumnSpace: 15.0625,
          dynamicTriggerPathList: [],
          resetOnSubmit: true,
          leftColumn: 23,
          dynamicBindingPathList: [
            {
              key: "accentColor",
            },
          ],
          labelStyle: "",
          inputType: "TEXT",
          isDisabled: false,
          key: "ftefjorusw",
          labelTextSize: "0.875rem",
          isRequired: false,
          rightColumn: 43,
          widgetId: "lz9hvhcltl",
          isVisible: true,
          label: "",
          allowCurrencyChange: false,
          version: 1,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          iconAlign: "left",
          defaultText: "",
          borderRadius: "0px",
          boxShadow: "none",
          accentColor: "{{appsmith.theme.colors.primaryColor}}",
        },
        {
          widgetName: "Button1",
          onClick:
            '{{Api1.run(()=>{\ndownload((\nfunction(){\nreturn ""\n}\n)(), "test.png", "image/png")\n})}}',
          buttonColor: "#03B365",
          dynamicPropertyPathList: [
            {
              key: "onClick",
            },
          ],
          displayName: "Button",
          iconSVG: "/static/media/icon.cca02633.svg",
          topRow: 29,
          bottomRow: 33,
          tooltip: "",
          parentRowSpace: 10,
          type: "BUTTON_WIDGET",
          hideCard: false,
          animateLoading: true,
          parentColumnSpace: 14.0625,
          dynamicTriggerPathList: [
            {
              key: "onClick",
            },
          ],
          leftColumn: 20,
          dynamicBindingPathList: [],
          text: "Submit",
          isDisabled: false,
          key: "pg01cxraj1",
          labelTextSize: "0.875rem",
          rightColumn: 36,
          isDefaultClickDisabled: true,
          widgetId: "d229q1ydul",
          isVisible: true,
          recaptchaType: "V3",
          version: 1,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          buttonVariant: "PRIMARY",
          placement: "CENTER",
          borderRadius: "0px",
          boxShadow: "none",
        },
        {
          widgetName: "Input2",
          displayName: "Input",
          iconSVG: "/static/media/icon.9f505595.svg",
          topRow: 44,
          bottomRow: 48,
          parentRowSpace: 10,
          autoFocus: false,
          type: "INPUT_WIDGET",
          hideCard: false,
          animateLoading: true,
          parentColumnSpace: 14.0625,
          resetOnSubmit: true,
          leftColumn: 9,
          labelStyle: "",
          inputType: "TEXT",
          isDisabled: false,
          key: "519sr07k1u",
          labelTextSize: "0.875rem",
          isRequired: false,
          rightColumn: 29,
          widgetId: "eenq4c022d",
          isVisible: true,
          label: "",
          allowCurrencyChange: false,
          version: 1,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          iconAlign: "left",
          defaultText: "",
          borderRadius: "0px",
          boxShadow: "none",
          accentColor: "{{appsmith.theme.colors.primaryColor}}",
          dynamicBindingPathList: [
            {
              key: "accentColor",
            },
          ],
        },
        {
          widgetName: "List1",
          template: {
            Image1: {
              isVisible: true,
              defaultImage: `${ASSETS_CDN_URL}/widgets/default.png`,
              imageShape: "RECTANGLE",
              maxZoomLevel: 1,
              enableRotation: false,
              enableDownload: false,
              objectFit: "contain",
              image: "{{List1.listData.map((currentItem) => currentItem.img)}}",
              widgetName: "Image1",
              version: 1,
              animateLoading: true,
              type: "IMAGE_WIDGET",
              hideCard: false,
              displayName: "Image",
              key: "9cn4ooadxj",
              iconSVG: "/static/media/icon.52d8fb96.svg",
              dynamicBindingPathList: [
                {
                  key: "image",
                },
              ],
              dynamicTriggerPathList: [],
              widgetId: "yqofym38tn",
              renderMode: "CANVAS",
              isLoading: false,
              leftColumn: 0,
              rightColumn: 16,
              topRow: 0,
              bottomRow: 8.4,
              parentId: "vqn2okwc6a",
            },
            Text1: {
              isVisible: true,
              text: "{{List1.listData.map((currentItem) => currentItem.name)}}",
              fontSize: "PARAGRAPH",
              fontStyle: "BOLD",
              textAlign: "LEFT",
              textColor: "#231F20",
              truncateButtonColor: "#FFC13D",
              widgetName: "Text1",
              shouldScroll: false,
              shouldTruncate: false,
              version: 1,
              animateLoading: true,
              type: "TEXT_WIDGET",
              fontFamily: "System Default",
              hideCard: false,
              displayName: "Text",
              key: "yd217bk315",
              iconSVG: "/static/media/icon.97c59b52.svg",
              textStyle: "HEADING",
              dynamicBindingPathList: [
                {
                  key: "text",
                },
              ],
              dynamicTriggerPathList: [],
              widgetId: "zeqf6yfm3s",
              renderMode: "CANVAS",
              isLoading: false,
              leftColumn: 16,
              rightColumn: 28,
              topRow: 0,
              bottomRow: 4,
              parentId: "vqn2okwc6a",
            },
            Text2: {
              isVisible: true,
              text: "{{List1.listData.map((currentItem) => currentItem.id)}}",
              fontSize: "PARAGRAPH",
              fontStyle: "BOLD",
              textAlign: "LEFT",
              textColor: "#231F20",
              truncateButtonColor: "#FFC13D",
              widgetName: "Text2",
              shouldScroll: false,
              shouldTruncate: false,
              version: 1,
              animateLoading: true,
              type: "TEXT_WIDGET",
              fontFamily: "System Default",
              hideCard: false,
              displayName: "Text",
              key: "yd217bk315",
              iconSVG: "/static/media/icon.97c59b52.svg",
              textStyle: "BODY",
              dynamicBindingPathList: [
                {
                  key: "text",
                },
              ],
              dynamicTriggerPathList: [],
              widgetId: "8wyekp2o6e",
              renderMode: "CANVAS",
              isLoading: false,
              leftColumn: 16,
              rightColumn: 24,
              topRow: 4,
              bottomRow: 8,
              parentId: "vqn2okwc6a",
            },
          },
          listData: [
            {
              id: "001",
              name: "Blue",
              img: `${ASSETS_CDN_URL}/widgets/default.png`,
            },
            {
              id: "002",
              name: "Green",
              img: `${ASSETS_CDN_URL}/widgets/default.png`,
            },
            {
              id: "003",
              name: "Red",
              img: `${ASSETS_CDN_URL}/widgets/default.png`,
            },
          ],
          isCanvas: true,
          displayName: "List",
          iconSVG: "/static/media/icon.9925ee17.svg",
          topRow: 34,
          bottomRow: 74,
          parentRowSpace: 10,
          type: "LIST_WIDGET",
          hideCard: false,
          gridGap: 0,
          animateLoading: true,
          parentColumnSpace: 14.0625,
          leftColumn: 39,
          dynamicBindingPathList: [
            {
              key: "template.Image1.image",
            },
            {
              key: "template.Text1.text",
            },
            {
              key: "template.Text2.text",
            },
            {
              key: "accentColor",
            },
          ],
          gridType: "vertical",
          enhancements: true,
          children: [
            {
              widgetName: "Canvas1",
              displayName: "Canvas",
              topRow: 0,
              bottomRow: 400,
              parentRowSpace: 1,
              type: "CANVAS_WIDGET",
              canExtend: false,
              hideCard: true,
              dropDisabled: true,
              openParentPropertyPane: true,
              minHeight: 400,
              noPad: true,
              parentColumnSpace: 1,
              leftColumn: 0,
              children: [
                {
                  boxShadow: "none",
                  widgetName: "Container1",
                  borderColor: "transparent",
                  disallowCopy: true,
                  isCanvas: true,
                  displayName: "Container",
                  iconSVG: "/static/media/icon.1977dca3.svg",
                  dynamicPropertyPathList: [
                    {
                      key: "borderRadius",
                    },
                  ],
                  topRow: 0,
                  bottomRow: 12,
                  dragDisabled: true,
                  type: "CONTAINER_WIDGET",
                  hideCard: false,
                  openParentPropertyPane: true,
                  isDeletable: false,
                  animateLoading: true,
                  leftColumn: 0,
                  dynamicHeight: "FIXED",
                  maxDynamicHeight: 9000,
                  minDynamicHeight: 4,
                  children: [
                    {
                      widgetName: "Canvas2",
                      detachFromLayout: true,
                      displayName: "Canvas",
                      widgetId: "vqn2okwc6a",
                      containerStyle: "none",
                      topRow: 0,
                      parentRowSpace: 1,
                      isVisible: true,
                      type: "CANVAS_WIDGET",
                      canExtend: false,
                      version: 1,
                      hideCard: true,
                      parentId: "9e77epyavg",
                      renderMode: "CANVAS",
                      isLoading: false,
                      parentColumnSpace: 1,
                      leftColumn: 0,
                      children: [
                        {
                          widgetName: "Image1",
                          displayName: "Image",
                          iconSVG: "/static/media/icon.52d8fb96.svg",
                          topRow: 0,
                          bottomRow: 8.4,
                          type: "IMAGE_WIDGET",
                          hideCard: false,
                          animateLoading: true,
                          dynamicTriggerPathList: [],
                          imageShape: "RECTANGLE",
                          dynamicBindingPathList: [
                            {
                              key: "image",
                            },
                          ],
                          leftColumn: 0,
                          defaultImage: `${ASSETS_CDN_URL}/widgets/default.png`,
                          key: "9cn4ooadxj",
                          labelTextSize: "0.875rem",
                          image: "{{currentItem.img}}",
                          rightColumn: 16,
                          objectFit: "contain",
                          widgetId: "yqofym38tn",
                          logBlackList: {
                            isVisible: true,
                            defaultImage: true,
                            imageShape: true,
                            maxZoomLevel: true,
                            enableRotation: true,
                            enableDownload: true,
                            objectFit: true,
                            image: true,
                            widgetName: true,
                            version: true,
                            animateLoading: true,
                            type: true,
                            hideCard: true,
                            displayName: true,
                            key: true,
                            iconSVG: true,
                            isCanvas: true,
                            dynamicBindingPathList: true,
                            dynamicTriggerPathList: true,
                            minHeight: true,
                            widgetId: true,
                            renderMode: true,
                            isLoading: true,
                            parentColumnSpace: true,
                            parentRowSpace: true,
                            leftColumn: true,
                            rightColumn: true,
                            topRow: true,
                            bottomRow: true,
                            parentId: true,
                          },
                          isVisible: true,
                          version: 1,
                          parentId: "vqn2okwc6a",
                          renderMode: "CANVAS",
                          isLoading: false,
                          maxZoomLevel: 1,
                          enableDownload: false,
                          enableRotation: false,
                          borderRadius: "0px",
                          boxShadow: "none",
                          dynamicHeight: "FIXED",
                        },
                        {
                          widgetName: "Text1",
                          displayName: "Text",
                          iconSVG: "/static/media/icon.97c59b52.svg",
                          topRow: 0,
                          bottomRow: 4,
                          type: "TEXT_WIDGET",
                          fontFamily: "System Default",
                          hideCard: false,
                          animateLoading: true,
                          dynamicTriggerPathList: [],
                          dynamicBindingPathList: [
                            {
                              key: "text",
                            },
                          ],
                          dynamicHeight: "FIXED",
                          maxDynamicHeight: 9000,
                          minDynamicHeight: 4,
                          leftColumn: 16,
                          truncateButtonColor: "#FFC13D",
                          text: "{{currentItem.name}}",
                          key: "yd217bk315",
                          labelTextSize: "0.875rem",
                          rightColumn: 28,
                          textAlign: "LEFT",
                          widgetId: "zeqf6yfm3s",
                          logBlackList: {
                            isVisible: true,
                            text: true,
                            fontSize: true,
                            fontStyle: true,
                            textAlign: true,
                            textColor: true,
                            truncateButtonColor: true,
                            widgetName: true,
                            shouldScroll: true,
                            shouldTruncate: true,
                            version: true,
                            animateLoading: true,
                            type: true,
                            hideCard: true,
                            displayName: true,
                            key: true,
                            iconSVG: true,
                            isCanvas: true,
                            textStyle: true,
                            dynamicBindingPathList: true,
                            dynamicTriggerPathList: true,
                            minHeight: true,
                            widgetId: true,
                            renderMode: true,
                            isLoading: true,
                            parentColumnSpace: true,
                            parentRowSpace: true,
                            leftColumn: true,
                            rightColumn: true,
                            topRow: true,
                            bottomRow: true,
                            parentId: true,
                          },
                          isVisible: true,
                          fontStyle: "BOLD",
                          textColor: "#231F20",
                          version: 1,
                          parentId: "vqn2okwc6a",
                          overflow: "NONE",
                          renderMode: "CANVAS",
                          isLoading: false,
                          fontSize: "0.875rem",
                          textStyle: "HEADING",
                          borderRadius: "0px",
                          boxShadow: "none",
                        },
                        {
                          widgetName: "Text2",
                          displayName: "Text",
                          iconSVG: "/static/media/icon.97c59b52.svg",
                          topRow: 4,
                          bottomRow: 8,
                          type: "TEXT_WIDGET",
                          fontFamily: "System Default",
                          hideCard: false,
                          animateLoading: true,
                          dynamicTriggerPathList: [],
                          dynamicBindingPathList: [
                            {
                              key: "text",
                            },
                          ],
                          dynamicHeight: "FIXED",
                          maxDynamicHeight: 9000,
                          minDynamicHeight: 4,
                          leftColumn: 16,
                          truncateButtonColor: "#FFC13D",
                          text: "{{currentItem.id}}",
                          key: "yd217bk315",
                          labelTextSize: "0.875rem",
                          rightColumn: 24,
                          textAlign: "LEFT",
                          widgetId: "8wyekp2o6e",
                          logBlackList: {
                            isVisible: true,
                            text: true,
                            fontSize: true,
                            fontStyle: true,
                            textAlign: true,
                            textColor: true,
                            truncateButtonColor: true,
                            widgetName: true,
                            shouldScroll: true,
                            shouldTruncate: true,
                            version: true,
                            animateLoading: true,
                            type: true,
                            hideCard: true,
                            displayName: true,
                            key: true,
                            iconSVG: true,
                            isCanvas: true,
                            textStyle: true,
                            dynamicBindingPathList: true,
                            dynamicTriggerPathList: true,
                            minHeight: true,
                            widgetId: true,
                            renderMode: true,
                            isLoading: true,
                            parentColumnSpace: true,
                            parentRowSpace: true,
                            leftColumn: true,
                            rightColumn: true,
                            topRow: true,
                            bottomRow: true,
                            parentId: true,
                          },
                          isVisible: true,
                          fontStyle: "BOLD",
                          textColor: "#231F20",
                          version: 1,
                          parentId: "vqn2okwc6a",
                          overflow: "NONE",
                          renderMode: "CANVAS",
                          isLoading: false,
                          fontSize: "0.875rem",
                          textStyle: "BODY",
                          borderRadius: "0px",
                          boxShadow: "none",
                        },
                      ],
                      key: "omhgz5cakp",
                      labelTextSize: "0.875rem",
                      borderRadius: "0px",
                      boxShadow: "none",
                    },
                  ],
                  borderWidth: "0",
                  key: "ca3a42k2a4",
                  labelTextSize: "0.875rem",
                  disablePropertyPane: true,
                  backgroundColor: "white",
                  rightColumn: 64,
                  widgetId: "9e77epyavg",
                  containerStyle: "card",
                  isVisible: true,
                  version: 1,
                  parentId: "q3ype57cdo",
                  renderMode: "CANVAS",
                  isLoading: false,
                  borderRadius: "0px",
                },
              ],
              key: "omhgz5cakp",
              labelTextSize: "0.875rem",
              rightColumn: 337.5,
              detachFromLayout: true,
              widgetId: "q3ype57cdo",
              containerStyle: "none",
              isVisible: true,
              version: 1,
              parentId: "iupz1d99ka",
              renderMode: "CANVAS",
              isLoading: false,
              borderRadius: "0px",
              boxShadow: "none",
            },
          ],
          key: "axex98spx3",
          backgroundColor: "transparent",
          labelTextSize: "0.875rem",
          rightColumn: 63,
          itemBackgroundColor: "#FFFFFF",
          widgetId: "iupz1d99ka",
          isVisible: true,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          version: 1,
          borderRadius: "0px",
          boxShadow: "none",
          accentColor: "{{appsmith.theme.colors.primaryColor}}",
        },
      ],
      containerStyle: "none",
      detachFromLayout: true,
      dynamicBindingPathList: [],
      dynamicTriggerPathList: [],
      leftColumn: 0,
      minHeight: 640,
      parentColumnSpace: 1,
      parentRowSpace: 1,
      rightColumn: 912,
      snapColumns: 64,
      snapRows: 125,
      topRow: 0,
      type: "CANVAS_WIDGET",
      widgetId: "0",
      widgetName: "MainContainer",
      renderMode: RenderModes.CANVAS,
      isLoading: false,
    };

    const actualNextDsl = transformDSL(currentDSL);

    expect(actualNextDsl).toEqual(expectedNextDSL);
  });

  it("RadioGroupWidget: Add alignment property, set to LEFT", () => {
    const currentVersion = 51;
    const currentDSL: ContainerWidgetProps<WidgetProps> = {
      widgetName: "MainContainer",
      renderMode: RenderModes.CANVAS,
      isLoading: false,
      backgroundColor: "none",
      rightColumn: 909,
      snapColumns: 64,
      detachFromLayout: true,
      widgetId: "0",
      topRow: 0,
      bottomRow: 710,
      containerStyle: "none",
      snapRows: 125,
      parentRowSpace: 1,
      type: "CANVAS_WIDGET",
      canExtend: true,
      version: currentVersion,
      minHeight: 690,
      parentColumnSpace: 1,
      dynamicBindingPathList: [],
      leftColumn: 0,
      children: [
        {
          widgetName: "RadioGroup1",
          displayName: "Radio Group",
          iconSVG: "/static/media/icon.ba2b2ee0.svg",
          topRow: 6,
          bottomRow: 14,
          parentRowSpace: 10,
          type: "RADIO_GROUP_WIDGET",
          hideCard: false,
          defaultOptionValue: "Y",
          animateLoading: true,
          parentColumnSpace: 14.015625,
          leftColumn: 3,
          options: [
            {
              label: "Yes",
              value: "Y",
            },
            {
              label: "No",
              value: "N",
            },
          ],
          isDisabled: false,
          key: "pfm838nmst",
          isRequired: false,
          rightColumn: 27,
          widgetId: "zo3fvq3exo",
          isVisible: true,
          label: "",
          version: 1,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
        },
        {
          boxShadow: "NONE",
          widgetName: "Container1",
          borderColor: "transparent",
          isCanvas: true,
          displayName: "Container",
          iconSVG: "/static/media/icon.1977dca3.svg",
          topRow: 17,
          bottomRow: 35,
          parentRowSpace: 10,
          type: "CONTAINER_WIDGET",
          hideCard: false,
          animateLoading: true,
          parentColumnSpace: 14.015625,
          leftColumn: 3,
          children: [
            {
              widgetName: "Canvas1",
              rightColumn: 336.375,
              detachFromLayout: true,
              displayName: "Canvas",
              widgetId: "07bpn6tbfi",
              containerStyle: "none",
              topRow: 0,
              bottomRow: 390,
              parentRowSpace: 1,
              isVisible: true,
              type: "CANVAS_WIDGET",
              canExtend: false,
              version: 1,
              hideCard: true,
              parentId: "tt24x0w1w8",
              minHeight: 400,
              renderMode: "CANVAS",
              isLoading: false,
              parentColumnSpace: 1,
              leftColumn: 0,
              children: [
                {
                  widgetName: "RadioGroup2",
                  displayName: "Radio Group",
                  iconSVG: "/static/media/icon.ba2b2ee0.svg",
                  topRow: 2,
                  bottomRow: 10,
                  parentRowSpace: 10,
                  type: "RADIO_GROUP_WIDGET",
                  hideCard: false,
                  defaultOptionValue: "Y",
                  animateLoading: true,
                  parentColumnSpace: 4.943359375,
                  leftColumn: 2,
                  options: [
                    {
                      label: "Yes",
                      value: "Y",
                    },
                    {
                      label: "No",
                      value: "N",
                    },
                  ],
                  isDisabled: false,
                  key: "pfm838nmst",
                  isRequired: false,
                  rightColumn: 64,
                  widgetId: "cu4xgfuj9c",
                  isVisible: true,
                  label: "",
                  version: 1,
                  parentId: "07bpn6tbfi",
                  renderMode: "CANVAS",
                  isLoading: false,
                },
              ],
              key: "xtt3p4czog",
            },
          ],
          borderWidth: "0",
          key: "0s5opm25jx",
          backgroundColor: "#FFFFFF",
          rightColumn: 27,
          widgetId: "tt24x0w1w8",
          containerStyle: "card",
          isVisible: true,
          version: 1,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          borderRadius: "0",
        },
        {
          widgetName: "Form1",
          version: 1,
          backgroundColor: "white",
          rightColumn: 54,
          isCanvas: true,
          displayName: "Form",
          iconSVG: "/static/media/icon.ea3e08d1.svg",
          widgetId: "ybeukm257w",
          topRow: 6,
          bottomRow: 46,
          parentRowSpace: 10,
          isVisible: true,
          type: "FORM_WIDGET",
          hideCard: false,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          animateLoading: true,
          parentColumnSpace: 14.015625,
          leftColumn: 30,
          children: [
            {
              widgetName: "Canvas2",
              rightColumn: 336.375,
              detachFromLayout: true,
              displayName: "Canvas",
              widgetId: "ilkump68xe",
              containerStyle: "none",
              topRow: 0,
              bottomRow: 390,
              parentRowSpace: 1,
              isVisible: true,
              type: "CANVAS_WIDGET",
              canExtend: false,
              version: 1,
              hideCard: true,
              parentId: "ybeukm257w",
              minHeight: 400,
              renderMode: "CANVAS",
              isLoading: false,
              parentColumnSpace: 1,
              leftColumn: 0,
              children: [
                {
                  widgetName: "Text1",
                  displayName: "Text",
                  iconSVG: "/static/media/icon.97c59b52.svg",
                  topRow: 1,
                  bottomRow: 5,
                  type: "TEXT_WIDGET",
                  fontFamily: "System Default",
                  hideCard: false,
                  animateLoading: true,
                  leftColumn: 1.5,
                  shouldTruncate: false,
                  truncateButtonColor: "#FFC13D",
                  text: "Form",
                  key: "jh3gip369p",
                  rightColumn: 25.5,
                  textAlign: "LEFT",
                  widgetId: "yp585y41d6",
                  isVisible: true,
                  fontStyle: "BOLD",
                  textColor: "#231F20",
                  shouldScroll: false,
                  version: 1,
                  parentId: "ilkump68xe",
                  renderMode: "CANVAS",
                  isLoading: false,
                  fontSize: "HEADING1",
                },
                {
                  resetFormOnClick: true,
                  widgetName: "FormButton1",
                  buttonColor: "#03B365",
                  displayName: "FormButton",
                  iconSVG: "/static/media/icon.c8f649ed.svg",
                  topRow: 33,
                  bottomRow: 37,
                  type: "FORM_BUTTON_WIDGET",
                  hideCard: true,
                  animateLoading: true,
                  leftColumn: 46,
                  text: "Submit",
                  key: "ahb522obua",
                  rightColumn: 62,
                  isDefaultClickDisabled: true,
                  widgetId: "jrpy8ke6tw",
                  isVisible: true,
                  recaptchaType: "V3",
                  version: 1,
                  parentId: "ilkump68xe",
                  renderMode: "CANVAS",
                  isLoading: false,
                  disabledWhenInvalid: true,
                  buttonVariant: "PRIMARY",
                },
                {
                  resetFormOnClick: true,
                  widgetName: "FormButton2",
                  buttonColor: "#03B365",
                  displayName: "FormButton",
                  iconSVG: "/static/media/icon.c8f649ed.svg",
                  topRow: 33,
                  bottomRow: 37,
                  type: "FORM_BUTTON_WIDGET",
                  hideCard: true,
                  animateLoading: true,
                  leftColumn: 30,
                  text: "Reset",
                  key: "ahb522obua",
                  rightColumn: 46,
                  isDefaultClickDisabled: true,
                  widgetId: "j1uwneh0zn",
                  isVisible: true,
                  recaptchaType: "V3",
                  version: 1,
                  parentId: "ilkump68xe",
                  renderMode: "CANVAS",
                  isLoading: false,
                  disabledWhenInvalid: false,
                  buttonVariant: "SECONDARY",
                },
                {
                  widgetName: "RadioGroup3",
                  displayName: "Radio Group",
                  iconSVG: "/static/media/icon.ba2b2ee0.svg",
                  topRow: 7,
                  bottomRow: 15,
                  parentRowSpace: 10,
                  type: "RADIO_GROUP_WIDGET",
                  hideCard: false,
                  defaultOptionValue: "Y",
                  animateLoading: true,
                  parentColumnSpace: 4.943359375,
                  leftColumn: 1,
                  options: [
                    {
                      label: "Yes",
                      value: "Y",
                    },
                    {
                      label: "No",
                      value: "N",
                    },
                  ],
                  isDisabled: false,
                  key: "pfm838nmst",
                  isRequired: false,
                  rightColumn: 64,
                  widgetId: "d3orpb3ele",
                  isVisible: true,
                  label: "",
                  version: 1,
                  parentId: "ilkump68xe",
                  renderMode: "CANVAS",
                  isLoading: false,
                },
              ],
              key: "xtt3p4czog",
            },
          ],
          key: "04103tgkwj",
        },
      ],
    };
    const expectedNextDSL: ContainerWidgetProps<WidgetProps> = {
      widgetName: "MainContainer",
      renderMode: RenderModes.CANVAS,
      isLoading: false,
      backgroundColor: "none",
      rightColumn: 909,
      snapColumns: 64,
      detachFromLayout: true,
      widgetId: "0",
      topRow: 0,
      bottomRow: 710,
      containerStyle: "none",
      snapRows: 125,
      parentRowSpace: 1,
      type: "CANVAS_WIDGET",
      canExtend: true,
      version: currentVersion,
      minHeight: 690,
      parentColumnSpace: 1,
      dynamicBindingPathList: [],
      leftColumn: 0,
      children: [
        {
          widgetName: "RadioGroup1",
          displayName: "Radio Group",
          iconSVG: "/static/media/icon.ba2b2ee0.svg",
          topRow: 6,
          bottomRow: 14,
          parentRowSpace: 10,
          type: "RADIO_GROUP_WIDGET",
          hideCard: false,
          defaultOptionValue: "Y",
          animateLoading: true,
          parentColumnSpace: 14.015625,
          leftColumn: 3,
          options: [
            {
              label: "Yes",
              value: "Y",
            },
            {
              label: "No",
              value: "N",
            },
          ],
          isDisabled: false,
          key: "pfm838nmst",
          isRequired: false,
          rightColumn: 27,
          widgetId: "zo3fvq3exo",
          isVisible: true,
          label: "",
          version: 1,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          alignment: "left",
        },
        {
          boxShadow: "NONE",
          widgetName: "Container1",
          borderColor: "transparent",
          isCanvas: true,
          displayName: "Container",
          iconSVG: "/static/media/icon.1977dca3.svg",
          topRow: 17,
          bottomRow: 35,
          parentRowSpace: 10,
          type: "CONTAINER_WIDGET",
          hideCard: false,
          animateLoading: true,
          parentColumnSpace: 14.015625,
          leftColumn: 3,
          children: [
            {
              widgetName: "Canvas1",
              rightColumn: 336.375,
              detachFromLayout: true,
              displayName: "Canvas",
              widgetId: "07bpn6tbfi",
              containerStyle: "none",
              topRow: 0,
              bottomRow: 390,
              parentRowSpace: 1,
              isVisible: true,
              type: "CANVAS_WIDGET",
              canExtend: false,
              version: 1,
              hideCard: true,
              parentId: "tt24x0w1w8",
              minHeight: 400,
              renderMode: "CANVAS",
              isLoading: false,
              parentColumnSpace: 1,
              leftColumn: 0,
              children: [
                {
                  widgetName: "RadioGroup2",
                  displayName: "Radio Group",
                  iconSVG: "/static/media/icon.ba2b2ee0.svg",
                  topRow: 2,
                  bottomRow: 10,
                  parentRowSpace: 10,
                  type: "RADIO_GROUP_WIDGET",
                  hideCard: false,
                  defaultOptionValue: "Y",
                  animateLoading: true,
                  parentColumnSpace: 4.943359375,
                  leftColumn: 2,
                  options: [
                    {
                      label: "Yes",
                      value: "Y",
                    },
                    {
                      label: "No",
                      value: "N",
                    },
                  ],
                  isDisabled: false,
                  key: "pfm838nmst",
                  isRequired: false,
                  rightColumn: 64,
                  widgetId: "cu4xgfuj9c",
                  isVisible: true,
                  label: "",
                  version: 1,
                  parentId: "07bpn6tbfi",
                  renderMode: "CANVAS",
                  isLoading: false,
                  alignment: "left",
                },
              ],
              key: "xtt3p4czog",
            },
          ],
          borderWidth: "0",
          key: "0s5opm25jx",
          backgroundColor: "#FFFFFF",
          rightColumn: 27,
          widgetId: "tt24x0w1w8",
          containerStyle: "card",
          isVisible: true,
          version: 1,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          borderRadius: "0",
        },
        {
          widgetName: "Form1",
          version: 1,
          backgroundColor: "white",
          rightColumn: 54,
          isCanvas: true,
          displayName: "Form",
          iconSVG: "/static/media/icon.ea3e08d1.svg",
          widgetId: "ybeukm257w",
          topRow: 6,
          bottomRow: 46,
          parentRowSpace: 10,
          isVisible: true,
          type: "FORM_WIDGET",
          hideCard: false,
          parentId: "0",
          renderMode: "CANVAS",
          isLoading: false,
          animateLoading: true,
          parentColumnSpace: 14.015625,
          leftColumn: 30,
          children: [
            {
              widgetName: "Canvas2",
              rightColumn: 336.375,
              detachFromLayout: true,
              displayName: "Canvas",
              widgetId: "ilkump68xe",
              containerStyle: "none",
              topRow: 0,
              bottomRow: 390,
              parentRowSpace: 1,
              isVisible: true,
              type: "CANVAS_WIDGET",
              canExtend: false,
              version: 1,
              hideCard: true,
              parentId: "ybeukm257w",
              minHeight: 400,
              renderMode: "CANVAS",
              isLoading: false,
              parentColumnSpace: 1,
              leftColumn: 0,
              children: [
                {
                  widgetName: "Text1",
                  displayName: "Text",
                  iconSVG: "/static/media/icon.97c59b52.svg",
                  topRow: 1,
                  bottomRow: 5,
                  type: "TEXT_WIDGET",
                  fontFamily: "System Default",
                  hideCard: false,
                  animateLoading: true,
                  leftColumn: 1.5,
                  shouldTruncate: false,
                  truncateButtonColor: "#FFC13D",
                  text: "Form",
                  key: "jh3gip369p",
                  rightColumn: 25.5,
                  textAlign: "LEFT",
                  widgetId: "yp585y41d6",
                  isVisible: true,
                  fontStyle: "BOLD",
                  textColor: "#231F20",
                  shouldScroll: false,
                  version: 1,
                  parentId: "ilkump68xe",
                  renderMode: "CANVAS",
                  isLoading: false,
                  fontSize: "HEADING1",
                },
                {
                  resetFormOnClick: true,
                  widgetName: "FormButton1",
                  buttonColor: "#03B365",
                  displayName: "FormButton",
                  iconSVG: "/static/media/icon.c8f649ed.svg",
                  topRow: 33,
                  bottomRow: 37,
                  type: "FORM_BUTTON_WIDGET",
                  hideCard: true,
                  animateLoading: true,
                  leftColumn: 46,
                  text: "Submit",
                  key: "ahb522obua",
                  rightColumn: 62,
                  isDefaultClickDisabled: true,
                  widgetId: "jrpy8ke6tw",
                  isVisible: true,
                  recaptchaType: "V3",
                  version: 1,
                  parentId: "ilkump68xe",
                  renderMode: "CANVAS",
                  isLoading: false,
                  disabledWhenInvalid: true,
                  buttonVariant: "PRIMARY",
                },
                {
                  resetFormOnClick: true,
                  widgetName: "FormButton2",
                  buttonColor: "#03B365",
                  displayName: "FormButton",
                  iconSVG: "/static/media/icon.c8f649ed.svg",
                  topRow: 33,
                  bottomRow: 37,
                  type: "FORM_BUTTON_WIDGET",
                  hideCard: true,
                  animateLoading: true,
                  leftColumn: 30,
                  text: "Reset",
                  key: "ahb522obua",
                  rightColumn: 46,
                  isDefaultClickDisabled: true,
                  widgetId: "j1uwneh0zn",
                  isVisible: true,
                  recaptchaType: "V3",
                  version: 1,
                  parentId: "ilkump68xe",
                  renderMode: "CANVAS",
                  isLoading: false,
                  disabledWhenInvalid: false,
                  buttonVariant: "SECONDARY",
                },
                {
                  widgetName: "RadioGroup3",
                  displayName: "Radio Group",
                  iconSVG: "/static/media/icon.ba2b2ee0.svg",
                  topRow: 7,
                  bottomRow: 15,
                  parentRowSpace: 10,
                  type: "RADIO_GROUP_WIDGET",
                  hideCard: false,
                  defaultOptionValue: "Y",
                  animateLoading: true,
                  parentColumnSpace: 4.943359375,
                  leftColumn: 1,
                  options: [
                    {
                      label: "Yes",
                      value: "Y",
                    },
                    {
                      label: "No",
                      value: "N",
                    },
                  ],
                  isDisabled: false,
                  key: "pfm838nmst",
                  isRequired: false,
                  rightColumn: 64,
                  widgetId: "d3orpb3ele",
                  isVisible: true,
                  label: "",
                  version: 1,
                  parentId: "ilkump68xe",
                  renderMode: "CANVAS",
                  isLoading: false,
                  alignment: "left",
                },
              ],
              key: "xtt3p4czog",
            },
          ],
          key: "04103tgkwj",
        },
      ],
    };

    const actualNextDSL = migrateRadioGroupAlignmentProperty(currentDSL);
    expect(actualNextDSL).toEqual(expectedNextDSL);
  });
});
